<!--订单信息-->
<template>
  <div class="orderInformation">
    <el-form :inline="true" :model="formInline" label-position="left">
      <el-row>
        <el-col :span="8">
          <el-form-item label="患者:">
            <el-text>{{formInline.patient_name}}</el-text>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="手机号:">
            <el-text>{{formInline.patient_mobile}}</el-text>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="医生/团队:">
            <el-text>{{formInline.doctor_name}}</el-text>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="订单状态:" class="itemCol">
            <el-text>{{formInline.status_text}}</el-text>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import { orderPatient } from '/src/api/orderManage/recipeOrder'
const props = defineProps({
  prescriptionOrderId: { type: String }
})
const formInline = ref({})

//订单信息
const getOrderPatient = async () => {
  try {
    const result = await orderPatient({id:props.prescriptionOrderId})
    if (result.code === 200) {
      formInline.value=result.data
    }
  } catch (error) {
    console.error('获取订单详情时出错：', error)
  }
}

onMounted(() => {
  getOrderPatient()
});
</script>

<style lang="scss" scoped>

</style>
